<?php
$countpedente	= count($_ped->lista("WHERE id_comprador = '".$_SESSION['idcliente']."' and ativo='0' ",false,false));
$countpago		= count($_ped->lista("WHERE id_comprador = '".$_SESSION['idcliente']."' and ativo='1' ",false,false));
$countdevol		= count($_ped->lista("WHERE id_comprador = '".$_SESSION['idcliente']."' and ativo='2' ",false,false));
$countentre		= count($_ped->lista("WHERE id_comprador = '".$_SESSION['idcliente']."' and ativo='4' ",false,false));

?>

<li>&gt;<a href="javascript:void(0);" onclick="javascript:carregaPagina('modulos/painel/minhas-compras/itens-pedentes.php','','CarregaPaginaMenu');">Compra(s) pedente(s) (<? if($countpedente>0){ echo "<span style=\"color:#0c0;\">".$countpedente."</span>"; }else{echo "<span style=\"color:#F00;\">".$countpedente."</span>";}?>)</a></li>
<li>&gt;<a href="javascript:void(0);" onclick="javascript:carregaPagina('modulos/painel/minhas-compras/itens-pagos.php','','CarregaPaginaMenu');">Compra(s) pago(s) (<? if($countpago>0){ echo "<span style=\"color:#0c0;\">".$countpago."</span>"; }else{echo "<span style=\"color:#F00;\">".$countpago."</span>";}?>)</a> </li>
<li>&gt;<a href="javascript:void(0);" onclick="javascript:carregaPagina('modulos/painel/minhas-compras/itens-recusado.php','','CarregaPaginaMenu');">Compra(s) devolvido(s) (<? if($countdevol>0){ echo "<span style=\"color:#0c0;\">".$countdevol."</span>"; }else{echo "<span style=\"color:#F00;\">".$countdevol."</span>";}?>)</a> </li>
<li>&gt;<a href="javascript:void(0);" onclick="javascript:carregaPagina('modulos/painel/minhas-compras/itens-entregues.php','','CarregaPaginaMenu');">Compra(s) entregue(s) (<? if($countentre>0){ echo "<span style=\"color:#0c0;\">".$countentre."</span>"; }else{echo "<span style=\"color:#F00;\">".$countentre."</span>";}?>)</a></li>
